-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Basis.derivatives
#102
Conversation
This spiraled a bit more than I had anticipated, but I think overall it's a step towards making the interface more composable. |
It also simplifies the tensor product derivative spaghetti by quite a bit. |
modepy/modes.py
Outdated
@@ -766,6 +791,28 @@ def gradients(self) -> tuple[BasisGradientType, ...]: | |||
Each function returns a tuple of derivatives, one per reference axis. | |||
""" | |||
|
|||
def functions_dr(self, axis: int) -> tuple[BasisFunctionType, ...]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still unsure about the name. Suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just derivatives
? deriv_functions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for derivatives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, that's probably the sanest. Renamed to that in the latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
axis_derivative_functions
?
I'm also leaning towards derivatives
, so that's perfectly fine by me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
axis_derivatives
is another option, but it's unlikely that we'd have any other type (directional?) derivative, so 🤷. I say let's leave it as derivatives
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a little documentation nitpick, but otherwise this looks good to me!
cc @a-alveyblanc